<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let goods = {
      name: `小米青春`,
      add: `北京海淀市`,
      weigth: `0.55kg`,
      getHi: function () {
         document.write(`阴天`)
      }
    }
    // 查找    对象名.属性名
    // console.log(goods.name);
    // console.log(goods[`add`]);
    // 修改   对象名.属性名= 新值   就是赋值操作
    // goods.name=`华为pro`
    // console.log(goods.name);
    // 新增     对象名.新属性名 =新值
    // goods .color=`red`
    // 删除    delete 对象名.属性名
    //  delete goods.name 
    //  console.log(goods);



    //  将商品名称修改小米10
    goods.name = `小米10`
    //  新增一个颜色为粉色
    goods.color = `pink`
    // 依次打印输出所有的属性
    document.write(goods.name)
    document.write(`<br>`)
    document.write(goods.add)
    document.write(`<br>`)
    document.write(goods.weigth)
    document.write(`<br>`)
    document.write(goods.color)
    document.write(`<br>`)
       

  </script>
</body>

</html>